package divTools;

public class Converter {
	
	/**
	 * Converts power in dBm to mW
	 * @param powerInDbm
	 * @return
	 */
	public static float dBmToMw(float powerInDbm) {	
		
		return (float) Math.pow(10, powerInDbm/10);		
	}
	
	/**
	 * Converts power in Mw to dBm
	 * @param powerInMw
	 * @return
	 */
	public static float MwTodBm(float powerInMw) {
		
		return (float) (10*Math.log10(powerInMw));
	}
}
